home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games Extra 1996 June / Amiga Games Extra 1996 #6.iso / userbox / publicdomain / picview20 / install < prev    next >
Text File  |  1996-03-24  |  7KB  |  265 lines

  1.  
  2. (SET @default-dest "Work:")
  3. (SET default_lang 0)
  4.  
  5. ; ***** english texts *****
  6.  
  7. (SET #needKick (CAT "\nPicView need Kickstart Version 39 at least." ) )
  8.  
  9. (SET #startMsg (CAT "\nWelcom to PicView 2.00 !\n\n"
  10.                      "This script installs PicView on your AMIGA.\n\n") )
  11.  
  12. (SET #destPrompt ( CAT "Please choose the destination directory for PicView.\n"
  13.                        "No extra directory will be created." ) )
  14.  
  15. (SET #copyPFiles "Copying program files")
  16.  
  17. (SET #langPrompt "Select the languages you wish to use with PicView.")
  18.  
  19. (SET #DocPrompt "Select the directory for the documentation file.")
  20.  
  21. (SET #RexxPrompt "Select the ARexx scripts you wish to install." )
  22.  
  23. (SET #IconPrompt "Select an icon set for PicView.")
  24.  
  25. (SET #NormalIcon "Normal WB Icons (4 Colors)" )
  26.  
  27. (SET #MWBIcon "Magic WB Icons (8 Colors)" )
  28.  
  29. (SET #KeyPrompt "Select the directory for the key file.")
  30.  
  31. (SET #exitMsg (CAT "Much fun with PicView 2.00 wish you\n\n"
  32.                    "Holger Papajewski" ) )
  33.  
  34.  
  35. ; ***** german texts *****
  36.  
  37. (IF (= @language "deutsch")
  38. (
  39. (SET default_lang 1)
  40.  
  41. (SET #needKick ( CAT "\nPicView benötigt mindestens die Kickstart-Version 39." ) )
  42.  
  43. (SET #startMsg (CAT "\nWillkommen bei PicView 2.00 !\n\n"
  44.                      "Diese Datei installiert PicView auf ihrem AMIGA.\n\n") )
  45.  
  46. (SET #destPrompt (CAT "Wählen Sie bitte das Zielverzeichnis für PicView.\n"
  47.                       "Es wird kein extra Verzeichnis erzeugt.") )
  48.  
  49. (SET #copyPFiles "Kopiere Programmdateien")
  50.  
  51. (SET #langPrompt "Wählen Sie die Sprachen, die Sie mit PicView benutzen wollen.")
  52.  
  53. (SET #DocPrompt "Wählen Sie ein Verzeichnis, in welches die Dokumentation kopiert werden soll.")
  54.  
  55. (SET #RexxPrompt "Wählen Sie die ARexx-Programme, die installiert werden sollen." )
  56.  
  57. (SET #IconPrompt "Wählen Sie die Art der Piktogramme für PicView." )
  58.  
  59. (SET #NormalIcon "Normale WB Piktorgramme (4 Farben)" )
  60.  
  61. (SET #MWBIcon "MagicWB Piktogramme (8 Farben)" )
  62.  
  63. (SET #KeyPrompt "Wählen Sei das Verzeichnis, in welches das Key-File kopiert werden soll.")
  64.  
  65. (SET #exitMsg (CAT "Viel Spaß mit PicView 2.00 wünscht\n\n"
  66.                    "Holger Papajewski" ) )
  67. )
  68. )
  69.  
  70. ; ***** start installation *****
  71.  
  72. (if (< (/ (GETVERSION) 65536) 39)
  73.     (ABORT #needKick)
  74. )
  75.  
  76. (MESSAGE #startMsg)
  77.  
  78. ; ***** get dest dir for PicView *****
  79.  
  80. (SET @default-dest
  81.     (ASKDIR (PROMPT  #destPrompt)
  82.             (HELP    askdir-help)
  83.             (DEFAULT @default-dest )))
  84.  
  85. (COPYFILES (SOURCE "PicView")
  86.            (HELP copyfiles-help)
  87.            (DEST @default-dest )
  88. )
  89.  
  90. ; ***** install some languages *****
  91.  
  92. (SET sprachen (ASKOPTIONS (PROMPT #langPrompt)
  93.                           (HELP   askoptions-help)
  94.                           (CHOICES "english"
  95.                                    "deutsch"
  96.                                    "dansk"
  97.                           )
  98.                           (DEFAULT (+ default_lang 1) )
  99.               )
  100. )
  101.  
  102. (if (IN sprachen 1)
  103.     (COPYFILES (SOURCE "Locale/deutsch/PicView.catalog")
  104.                (DEST "Locale:Catalogs/deutsch") )
  105. )
  106.  
  107. (if (IN sprachen 2)
  108.     (COPYFILES (SOURCE "Locale/dansk/PicView.catalog")
  109.                (DEST "Locale:Catalogs/dansk") )
  110. )
  111.  
  112. ; ***** get dest for doc files *****
  113.  
  114. (SET @DocDir
  115.     (ASKDIR (PROMPT  #DocPrompt)
  116.             (HELP    askdir-help)
  117.             (DEFAULT @default-dest)
  118.             (NEWPATH)
  119.     )
  120. )
  121.  
  122. ; ***** install doc files *****
  123. (SET OForm "Orderform")
  124. (SET AFD   "AFD-COPYRIGHT")
  125.  
  126. (if (= @language "english")
  127.   (SET SDocDir  "Docs/english")
  128. )
  129.   
  130. (if (= @language "deutsch")
  131.   (
  132.     (SET OForm   "Registrierung")
  133.     (SET AFD     "AFD-COPYRIGHT.de")
  134.     (SET SDocDir "Docs/deutsch")
  135.   )
  136. )
  137.  
  138. (COPYFILES (SOURCE  SDocDir)
  139.            (DEST    @DocDir)
  140.            (CHOICES "PicView.guide" "ReadMe.mui" OForm AFD)
  141. )
  142.  
  143. ; ***** install ARexx scripts *****
  144.  
  145. (SET PVrexx (ASKOPTIONS (PROMPT #RexxPrompt)
  146.                           (HELP   askoptions-help)
  147.                           (CHOICES "MakeAscii.rexx" "MakeGuide.rexx" "SlideShow.rexx" )
  148.                           (DEFAULT 7 )
  149.           )
  150. )
  151.  
  152. (IF (IN PVrexx 1)
  153.   (COPYFILES (SOURCE "rexx/MakeAscii.rexx")
  154.              (DEST   "Rexx:")
  155.   )
  156. )
  157.  
  158. (IF (IN PVrexx 2)
  159.   (COPYFILES (SOURCE "rexx/MakeGuide.rexx")
  160.              (DEST   "Rexx:")
  161.   )
  162. )
  163.  
  164. (IF (IN PVrexx 3)
  165.   (COPYFILES (SOURCE "rexx/SlideShow.rexx")
  166.              (DEST   "Rexx:")
  167.   )
  168. )
  169.  
  170. ; ***** install icon set *****
  171.  
  172. (SET iconSet (ASKCHOICE (PROMPT  #IconPrompt)
  173.                         (HELP    askchoice-help)
  174.                         (CHOICES #NormalIcon #MWBIcon)
  175.                         (DEFAULT 0)
  176.              )
  177. )
  178.  
  179. (IF (= IconSet 1)
  180.   (
  181.     (COPYFILES (SOURCE "MWB/PicView.info")
  182.                (DEST   @default-dest )
  183.     )
  184.     (COPYFILES (SOURCE  "MWB/guide.info")
  185.                (DEST    @DocDir)
  186.                (NEWNAME "PicView.guide.info")
  187.     )
  188.     (COPYFILES (SOURCE  "MWB/txt.info")
  189.                (DEST    @DocDir)
  190.                (NEWNAME (CAT OForm ".info"))
  191.     )
  192.   )
  193.   ;*** else ***
  194.   (
  195.     (COPYFILES (SOURCE "PicView.info")
  196.                (DEST   @default-dest)
  197.     )
  198.     (COPYFILES (SOURCE  SDocDir)
  199.                (DEST    @DocDir)
  200.                (PATTERN "#?.info")
  201.     )
  202.   )
  203. )
  204.  
  205. (TOOLTYPE (DEST     (TACKON @default-dest "PicView"))
  206.           (SETSTACK 8192)
  207.           (NOPOSITION)
  208. )
  209. (TOOLTYPE (DEST     (TACKON @DocDir "PicView.guide"))
  210.           (NOPOSITION)
  211. )
  212. (TOOLTYPE (DEST     (TACKON @DocDir OForm))
  213.           (NOPOSITION)
  214. )
  215.  
  216. ; ***** check for key file and copy it *****
  217.  
  218. (SET @keyFile "Key/PicView.key")
  219. (SET key( EXISTS @keyFile (NOREQ)))
  220.  
  221. (IF (= key 1)
  222.   (
  223.     (SET ENVexists (EXISTS "ENV:KEYPATH" ))
  224.     (IF (= ENVexists 1)
  225.       (
  226.         (SET KeyPathENV (GETENV "KEYPATH" ))
  227.         (SET ENV-choice (CAT "KEYPATH - " KeyPathENV ))
  228.         (SET KeyDest (ASKCHOICE (PROMPT  #KeyPrompt)
  229.                                 (HELP    askchoice-help)
  230.                                 (CHOICES @default-dest "S:" ENV-choice)
  231.                                 (DEFAULT 0)))
  232.       )
  233.       ; ***** no KEYPATH var found *****
  234.       (
  235.         (SET KeyDest (ASKCHOICE (PROMPT  #KeyPrompt)
  236.                                 (HELP    askchoice-help)
  237.                                 (CHOICES @default-dest "S:")
  238.                                 (DEFAULT 0)))
  239.       )
  240.     )
  241.  
  242.     (IF (= KeyDest 0)
  243.       (COPYFILES (SOURCE @keyFile)
  244.                  (DEST   @default-dest)
  245.       )
  246.     )
  247.  
  248.     (IF (= KeyDest 1)
  249.       (COPYFILES (SOURCE @keyFile)
  250.                  (DEST   "S:")
  251.       )
  252.     )
  253.  
  254.     (IF (= KeyDest 2)
  255.       (COPYFILES (SOURCE @keyFile)
  256.                  (DEST   KeyPathENV)
  257.       )
  258.     )
  259.   )
  260. )
  261.  
  262. (EXIT #exitMsg )
  263.  
  264.  
  265.